package guoanmaker.operator.business.repository;

import guoanmaker.operator.business.model.OperatorHeadline;
import guoanmaker.operator.business.model.OperatorRoundPhotoApp;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 *  
 *
 * @author huZhaoyu 
 * @ClassName: OperatorRoundPhotoRepository
 * @Description: 轮播图Repository
 * @date 2017/6/28
 */
public interface OperatorRoundPhotoAppRepository extends JpaRepository<OperatorRoundPhotoApp, String>, JpaSpecificationExecutor<OperatorRoundPhotoApp> {
//	@Query("select u from OperatorUser u left join fetch u.roles r where u.username=:username")
//    public Optional<OperatorUser> findByUsername(@Param("username") String username);
	
	 @Query("select u from OperatorRoundPhotoApp u  where u.cityId=:cityId")
	    public List<OperatorRoundPhotoApp> findBycityCode(@Param("cityId") String cityId);

}